
//
//  WlisFriendTrendsVC.swift
//  Swift_missScarlett
//
//  Created by xmg on 16/8/13.
//  Copyright © 2016年 wlis. All rights reserved.
//

import UIKit

class WlisFriendTrendsVC: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        self.setUpNarBar();
        // Do any additional setup after loading the view.
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }

    @IBAction func loginBtnClick(sender: AnyObject) {
        let loginVc = WlisLoginRegisterVC();
        self.presentViewController(loginVc, animated: true, completion: nil);
    }
}

private extension WlisFriendTrendsVC{
   /** 设置导航条显示内容 */
    func setUpNarBar(){
        let leftButton = UIButton(type: .Custom);
        leftButton.setImage(UIImage(named: "friendsRecommentIcon"), forState: .Normal);
        leftButton.setImage(UIImage(named: "friendsRecommentIcon-click"), forState: .Highlighted);
        leftButton.sizeToFit();
        leftButton.addTarget(self, action: "leftBtnClick", forControlEvents: .TouchUpInside)
        let containView = UIView(frame: leftButton.bounds)
        containView.addSubview(leftButton);
        self.navigationItem.leftBarButtonItem = UIBarButtonItem(customView: containView);
        
        self.navigationItem.title = "我的关注";
    }
    
    @objc func leftBtnClick(){
        print("点击按钮");
        
    }
}